package com.wodsy.phoenix.apps.index.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.convert.converter.Converter;

public class DateToStringConvert implements Converter<Date, String> {

	public String convert(Date source) {
		if(source==null) return null;
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
		dateFormat.setLenient(false);
		return dateFormat.format(source);
	}

}
